<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        //中国时间转换UTC时间
        var date = new Date();
        date.setTime(date.getTime() + 86400000 * 2);
        console.log(date);
        console.log(date.toUTCString());




        var a = '123';
        function foo1() {
            console.log('hfuafili');
        }
        var cookieString = document.cookie;
        console.log(cookieString);
        var cookieArr = cookieString.split('; ');
        console.log(cookieArr);
        var obj = {};
        cookieArr.forEach(element => {
            element = element.split('=');
            console.log(element);
            obj[element[0]] = element[1];
        })
        console.log(obj);

    </script>
</body>

</html>